package airacrobats.io.data;

/**
 * A movement data.
 */
public class MovementData
{
    /**
     * Time of the movement.
     */
    private int time;
    /**
     * Roll.
     */
    private float roll;
    /**
     * Pitch.
     */
    private float pitch;
    /**
     * Engine power gain.
     */
    private int enginePowerGain;
    /**
     * Delta x of the stick.
     */
    private int deltaX;
    /**
     * Delta y of the stick.
     */
    private int deltaY;
    /**
     * Smoke on flag.
     */
    private boolean smokeOn;

    /**
     * @param time Stage time.
     * @param deltaX The x of the stick.
     * @param deltaY The y of the stick.
     * @param enginePowerGain The engine power gain.
     * @param smokeOn Smoke flag.
     */
    public MovementData(int time, int deltaX, float maxRoll, int deltaY, float maxPitch, int enginePowerGain,
            boolean smokeOn)
    {
        this.time = time;
        this.roll = -deltaX / 100.0f * maxRoll;
        this.pitch = -deltaY / 100.0f * maxPitch;
        this.deltaX = deltaX;
        this.deltaY = deltaY;
        this.enginePowerGain = enginePowerGain;
        this.smokeOn = smokeOn;
    }

    /**
     * @return The time.
     */
    public int getTime()
    {
        return time;
    }

    /**
     * @return The pitch.
     */
    public float getPitch()
    {
        return pitch;
    }

    /**
     * @return The roll.
     */
    public float getRoll()
    {
        return roll;
    }

    /**
     * @return The delta x.
     */
    public int getDeltaX()
    {
        return deltaX;
    }

    /**
     * @return The delta y.
     */
    public int getDeltaY()
    {
        return deltaY;
    }

    /**
     * @return The engine power gain.
     */
    public int getEnginePowerGain()
    {
        return enginePowerGain;
    }

    /**
     * @return Smoke flag.
     */
    public boolean isSmokeOn()
    {
        return smokeOn;
    }
}
